package demo1;

import java.io.File;
import java.io.IOException;

public class Demo_04 {
    public static void main(String[] args) throws IOException {
        File file=new File("d:/temp/aaa/bbb");
        File file1=new File("d:/temp/ccc");
        System.out.println("是否创建成功： "+file.mkdirs());
        System.out.println("是否创建成功： "+file1.mkdir());

        File file2=new File(file,"text.txt");
        System.out.println("是否创建成功： "+file2.createNewFile());
        System.out.println("是否可读： "+file2.canRead());
        System.out.println("是否可写： "+file2.canWrite());


    }
}
